import { createPinia } from "pinia";
import piniaPluginPersistedState from "pinia-plugin-persistedstate";
import type { App } from "vue";
import { reset } from "@/plugins/pinia/reset";

export const store = createPinia();
store.use(reset);
store.use(piniaPluginPersistedState);

// 启动 store
export const setupStore = (app: App<Element>) => {
  app.use(store);
};
